import {
  ajaxPost
} from "@/api/ajax"

const state = {
  broker: [],
}

const mutations = {
  set_broker_select(state, list) {
    state.broker = list;
  }
}

const actions = {
  getBrokerSelect({
    commit
  }) {
    ajaxPost("broker/options").then(res => {
      if (res.data) {

        commit('set_broker_select', res.data);
      }
    })
  }
}

export default {
  namespaced: true,
  state,
  mutations,
  actions
}
